package test;

public class Homework1 {
    public static void main(String[] args) {
        Homework1 homework1 = new Homework1();
        homework1.isTriangle(1,2,1);

    }
    void isTriangle(int a,int b,int c){
        if (a+b>c&&a+c>b&&b+c>a&&a-b<c&&a-c<b&&b-c<a){
            System.out.println(a+" "+b+" "+c);

        }else {
            throw new IllegalArgumentException("a,b,c不能构成三角形");
        }

    }
}
